package com.trust.service.impl;

import com.baomidou.mybatisplus.core.conditions.query.LambdaQueryWrapper;
import com.baomidou.mybatisplus.extension.service.impl.ServiceImpl;
import com.trust.entity.FieldInsect;
import com.trust.entity.FieldWeed;
import com.trust.mapper.FieldInsectMapper;
import com.trust.mapper.FieldWeedMapper;
import com.trust.service.FieldInsectService;
import com.trust.service.FieldWeedService;
import lombok.extern.slf4j.Slf4j;
import org.springframework.stereotype.Service;


@Slf4j
@Service
public class FieldInsectServiceImpl extends ServiceImpl<FieldInsectMapper, FieldInsect> implements FieldInsectService {

    @Override
    public void removeByFieldId(Integer fieldId) {
        LambdaQueryWrapper<FieldInsect> wrapper = new LambdaQueryWrapper<>();
        wrapper.eq(FieldInsect::getFieldId, fieldId);
        this.remove(wrapper);
    }
}
